<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//借贷宝路由
Route::get('test/index',function() {return view('/index');});//测试路由
Route::get('/home','IndexController@index');
//注册
// Route::get('auth/register','Auth\AuthController@getRegister');
// Route::post('auth/register','Auth\AuthController@postRegister');

// //登录退出
// Route::get('auth/login','Auth\AuthController@getLogin');//登录
// Route::post('auth/login','Auth\AuthController@postLogin');//接受提交的数据
// Route::get('/auth/logout','Auth\AuthController@getLogout');//退出

//注册/登录 路由分组
Route::group(
	['prefix'=>'auth','namespace'=>'Auth'],
	function() {
		Route::get('register','AuthController@getRegister');//注册
		Route::post('register','AuthController@postRegister');//获取提交数据
		Route::get('login','AuthController@getLogin');//登录
		Route::post('login','AuthController@postLogin');//获取数据
		Route::get('logout','AuthController@getLogout');//退出
	}
);


//申请贷款页面路由
Route::get('jie','ProController@jie');
Route::post('jie','ProController@jiePost');
//贷款信息展示路由
Route::get('prolist','CheckController@prolist');
//审核路由
Route::get('check/{pid}','CheckController@getCheck');//审核展示页面路由
Route::post('check/{pid}','CheckController@checkPost');//审核完成,接收数据路由



//投资路由
Route::get('/','IndexController@index');
Route::get('pro/{pid}','ProController@pro');
Route::post('touzi/{pid}','ProController@touziPost');

//用户收益路由
Route::get('payrun','GrowController@payrun');
//还款账单路由
Route::get('myzd','ProController@myzd');
//投资账单路由
Route::get('mytz','ProController@mytz');
//我的收益账单
Route::get('mysy','ProController@mysy');


/*发送邮件中间件路由*/
/*Route::post('auth/register',
	[
	'middleware'=>'App\Http\Middleware\EmailMiddleware',
	'uses'=>'Auth\AuthController@postRegister'
	]
	);*/

/*网银在线支付路由*/
Route::post('pay/{pid}','ProController@pay');


/*session测试路由*/
Route::resource('test','TestController');


/*验证码路由*/
Route::get('captcha','ProController@captcha');
